<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
            "http://www.w3.org/TR/REC-html40/loose.dtd">
<HTML>
<HEAD>



<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="GENERATOR" content="hevea 1.08">
<LINK rel="stylesheet" type="text/css" href="umsroot.css">
<TITLE>
Creating Attributed Variables
</TITLE>
</HEAD>
<BODY >
<A HREF="umsroot096.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="umsroot093.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot098.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
<HR>

<H2 CLASS="section"><A NAME="htoc221">16.4</A>&nbsp;&nbsp;Creating Attributed Variables</H2>
A new attribute can be added to a variable
using the tool predicate
<BLOCKQUOTE CLASS="quote">
<B>add_attribute(Var, Attr)</B>.
</BLOCKQUOTE>
<A NAME="@default904"></A>
An attribute whose name is not the current module name
can be added using <A HREF="../bips/kernel/termmanip/add_attribute-3.html"><B>add_attribute/3</B></A><A NAME="@default905"></A> which is its tool
body predicate (exported in <TT>sepia_kernel</TT>).
If <B>Var</B> is a free variable, it will be bound to a new attributed variable
whose attribute corresponding to the current module is
<B>Attr</B> and all its other attributes are free variables.
If <B>Var</B> is already an attributed variable and its attribute is uninstantiated,
it will be bound to <B>Attr</B>, otherwise the effect of this predicate
will be the same as unifying <B>Var</B> with another attributed variable
whose attribute corresponding to the current module is 
<B>Attr</B>.<BR>
<BR>
<HR>
<A HREF="umsroot096.html"><IMG SRC ="previous_motif.gif" ALT="Previous"></A>
<A HREF="umsroot093.html"><IMG SRC ="contents_motif.gif" ALT="Up"></A>
<A HREF="umsroot098.html"><IMG SRC ="next_motif.gif" ALT="Next"></A>
</BODY>
</HTML>
